{% extends "pc/layout.html" %} {% block content %}
<link rel="stylesheet" href="/css/pc/home.min.css" />
<div id="home">
  <div id="book">
    <div class="title">
      <span>前端手册</span>
      <a href="/book" class="more">查看更多</a>
    </div>
    <ul>
      {% for book in bookList %}
      <a href="/chapter/{{book.id}}">
        <li>
          <img src="{{book.img}}" alt="" />
          <div class="info">
            <p class="content-title">{{book.title}}</p>
            <span class="time"
              >{{book.createdAt.toLocaleString('zh-CN',{year:'numeric',month:'2-digit',day:'2-digit',hour12:false,hour:'2-digit',minute:'2-digit',second:'2-digit'})
              }}</span
            >
            <a href="/chapter/{{book.id}}"><button class="start">阅读</button></a>
          </div>
        </li>
      </a>
      {% endfor %}
    </ul>
  </div>
  <div id="blog">
    <div class="title">
      <span>精选博客</span>
      <a href="/blog" class="more">查看更多</a>
    </div>
    <ul>
      {% for blog in blogList %}
      <a href="/blogDetail/{{blog.id}}">
        <li>
          <img src="{{blog.img}}" alt="" />
          <div class="info">
            <p class="content-title">{{blog.title}}</p>
            <span class="time"
              >{{blog.createdAt.toLocaleString('zh-CN',{year:'numeric',month:'2-digit',day:'2-digit',hour12:false,hour:'2-digit',minute:'2-digit',second:'2-digit'})
              }}</span
            >
            <span class="summerary">
              最近接触比较多的新手程序员和准程序员，和他们交流的过程中，我发现了一些通用问题，今
              天把这些问题整理出来，希望可以 帮助更多的朋友们。
            </span>
          </div>
        </li>
      </a>
      {% endfor %}
    </ul>
  </div>
  <div id="video">
    <div class="title">
      <span>推荐视频</span>
      <a href="/video" class="more">查看更多</a>
    </div>
    <ul>
      {% for video in videoList %}
      <a href="#">
        <li>
          <img src="{{video.image}}" alt="" />
          <div class="info">
            <p class="content-title">{{video.title}}</p>
            <span class="time"
              >{{video.createdAt.toLocaleString('zh-CN',{year:'numeric',month:'2-digit',day:'2-digit',hour12:false,hour:'2-digit',minute:'2-digit',second:'2-digit'})
              }}</span
            >
            <button class="start">观看</button>
          </div>
        </li>
      </a>
      {% endfor %}
    </ul>
  </div>
</div>
{% include "pc/aside.html" %} {% endblock %}
